<div id="wrapper">
    <div id="page-wrapper">
        <div class="panel panel-primary">
            <div class="panel-heading"><h5 class="panel-title"></h5></div>
            <div class="panel-body">
                <div id="toolbar" class="ms-toolbar">
                    <button id="toolbar-add" class="btn btn-danger">
                        <span class="glyphicon glyphicon-plus"></span> 增加
                    </button>
                </div>
                <div class="modal fade" id="addcategory" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-hidden="true">&times;</button>
                                <h4 class="modal-title">增加圈子分类</h4>
                            </div>
                            <div class="modal-body">
                                <form id="addForm" class="form-horizontal">
                                    <div class="form-group">
                                        <label for="name" class="col-sm-2 control-label">名称</label>

                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="name" name="name"
                                                   placeholder="必填项">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="rank" class="col-sm-2 control-label">排名</label>

                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="rank" name="rank"
                                                   placeholder="必填项">
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button id="close" type="button" class="btn btn-primary" data-dismiss="modal">关闭
                                </button>
                                <button id="add_confirm" type="button" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </div>
                </div>
                <table class="table table-bordered ">
                    <thead>
                    <th>ID</th>
                    <th>名称</th>
                    <th>排序</th>
                    <th>创建时间</th>
                    <th>操作</th>
                    </thead>
                    <tbody>
                    {%notempty name="data"%}
                    <tr>
                        {%volist name="data->all()" id="vo"%}
                        <td>{%$vo.id%}</td>
                        <td>{%$vo.name%}</td>
                        <td>{%$vo.rank%}</td>
                        <td>{%$vo.create_time%}</td>
                        <td style="width: 38px;">
                            <button class="btn btn-danger btn-sm delcategory">删除</button>
                        </td>
                    </tr>
                    {%/volist%}
                    </tbody>
                </table>
                <div class="pull-right">
                    {%$data->render()%}
                </div>
                {%/notempty%}
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">确认删除</h4>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
                <button id="delete_confirm" type="button" class="btn btn-danger">确认</button>
            </div>
        </div>
    </div>
</div>
<script src="/static/home/widget/circle/category/addcategory.js"></script>
<script src="/static/home/widget/circle/category/delcategory.js"></script>
